// app/_layout.js
import { Stack } from 'expo-router';

export default function Layout() {
  return <Stack screenOptions={{ headerShown: false }} />;
}

// app/(tabs)/_layout.js
import { Tabs } from 'expo-router';
import { Ionicons } from '@expo/vector-icons';

export default function TabLayout() {
  return (
    <Tabs
      screenOptions={({ route }) => ({
        tabBarIcon: ({ color, size }) => {
          let iconName;
          if (route.name === 'home') iconName = 'search';
          else if (route.name === 'emails') iconName = 'at';
          else if (route.name === 'campaigns') iconName = 'send';
          else if (route.name === 'history') iconName = 'time';
          else if (route.name === 'settings') iconName = 'settings';
          // else if (route.name === 'template') iconName = 'settings';
          return <Ionicons name={iconName} size={size} color={color} />;
        },
      })}
    >
      <Tabs.Screen name="home" options={{ title: 'Crawl' }} />
      <Tabs.Screen name="emails" options={{ title: 'Emails' }} />
      <Tabs.Screen name="campaigns" options={{ title: 'Campaigns' }} />
      <Tabs.Screen name="history" options={{ title: 'History' }} />
      <Tabs.Screen name="settings" options={{ title: 'Settings' }} />
      {/* <Tabs.Screen name="template" options={{ title: 'Template' }} /> */}
    </Tabs>
  );
}
